cc_library(
    name = "shm_lib",
    hdrs = ["Data.h"],
    includes = ["."],  # 允许 #include "Data.h"
    deps = [":boost_interprocess"],
)

cc_binary(
    name = "writer",
    srcs = ["writer.cc"],
    deps = [":boost_interprocess", ":shm_lib"],
)

cc_binary(
    name = "reader",
    srcs = ["reader.cc"],
    deps = [":boost_interprocess", ":shm_lib"],
)

cc_library(
    name = "boost_interprocess",
    includes = ["/usr/include"],  # Boost 头文件所在目录
    linkopts = ["-lboost_system", "-lrt", "-lpthread"],
    visibility = ["//visibility:public"],
)
